/**************************
* @Summary
* @Author 20009200303 赵传博
* @Date 2022/4/3
*****************************/

#ifndef EX3_LEXER_H
#define EX3_LEXER_H

#include "common.h"

namespace Lexer{
    enum Token_value{
        NAME,       //常量
        NUMBER,     //浮点数
        END,        //字符串的结束标志
        PLUS = '+', MINUS = '-', MUL = '*', DIV = '/',
        PRINT = ';', ASSIGN = '=', LP = '(', RP = ')'
    };
    extern Token_value curr_tok;
    extern double number_value;
    extern string string_value;
    extern map<string, double> table;
    extern int line_number;

    extern ifstream* input;
    extern vector<string> fileNames;

    Token_value get_token();
    Token_value get_token(ifstream* inStream);
}

#endif //EX3_LEXER_H
